-- GENERATED SPELL FOR [Grand Magus Telestra] --


function spell0_26930(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(47727,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26930', 6000, 1)
end

function spell1_26930(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(56936,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26930', 6000, 1)
end

function spell2_26930(pUnit, Event) --@Ice Barb,n/a--
pUnit:FullCastSpellOnTarget(47729,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26930', 500, 1)
end

function spell3_26930(pUnit, Event) --@Ice Barb,n/a--
pUnit:FullCastSpellOnTarget(56937,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26930', 500, 1)
end

function Sorts_26930(pUnit, Event)
local choix_sorts_26930 = math.random(0, 3)
if choix_sorts_26930 == 0 then
pUnit:RegisterEvent('spell0_26930', 1, 1)
end
if choix_sorts_26930 == 1 then
pUnit:RegisterEvent('spell1_26930', 1, 1)
end
if choix_sorts_26930 == 2 then
pUnit:RegisterEvent('spell2_26930', 1, 1)
end
if choix_sorts_26930 == 3 then
pUnit:RegisterEvent('spell3_26930', 1, 1)
end
end

function mob26930_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26930', math.random(1500, 3000), 1)
end

function mob26930_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26930_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26930_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26930, 1, 'mob26930_Action')
RegisterUnitEvent(26930, 2, 'mob26930_Leave')
RegisterUnitEvent(26930, 3, 'mob26930_Kill')
RegisterUnitEvent(26930, 4, 'mob26930_Die')
